package de.hs_rm.mmk.group_talk.activities;

import java.util.ArrayList;

import android.content.Context;
import android.os.Handler;
import android.util.Log;
import android.widget.ArrayAdapter;

public class MemberListViewInterface {
	
	private static MemberListViewInterface instance;
	public static ArrayAdapter<String> memberList;
	static Context context;
	static Handler handler;
	
	public static MemberListViewInterface getInstance(Context context2, int userList, int user, ArrayList<String> members, Handler handler2){
		 
        if (instance == null) {
        	memberList = new ArrayAdapter<String>(context, R.layout.user_list, R.id.user, members); 
        	handler = handler2;
            instance = new MemberListViewInterface();
        }
        
        return instance;
	 }
	
	
	
	public void addNewMember(String newMember) {
		
		Log.d("addNewMember", ""+newMember);
		this.memberList.add("AD");		
		
	}

	public ArrayAdapter<String> getArrayAdapter() {
		return memberList;
	}
	
}
